<include file="Public:header" />
<div id="zoneHeader">
    <h2>增加广告信息</h2>
    <ul>
        <li><button type="button" class="btnFormEditSave">保存</button></li>
        <li><a href="?c={$Think.const.CONTROLLER_NAME}" class="btn">返回</a></li>
    </ul>
</div><!--/#zoneHeader-->
<div id="zoneBody" class="noFooter">
    <div id="zoneBodyContent">
        <form action="?c={$Think.const.CONTROLLER_NAME}&a=doSave" id="formEdit">
            <input type="hidden" name="plan_id" />
            <table class="table3" style="margin:auto;width:800px;">
                <tr>
                    <td width="150" align="right">所属计划：</td>
                    <td><span name="plan_name"></span></td>
                    <td align="right">计费模式：</td>
                    <td><span name="plan_type"></span></td>
                </tr>
                <tr>
                    <td align="right" >选择广告类型：</td>
                    <td width="200" >
                        <select name="type">
                            <volist name=":getRelationAdTypes($record['plan_type'])" id="vo">
                            <option value="{$vo}">{$vo|getAdTypeCn}</option>
                            </volist>
                        </select>
                    </td>
                    <td width="100" align="right"><!--轮播权重：--></td>
                    <td><!--<input name="weight" type="text" class="fW50p" value="1" />--></td>
                </tr>
                <tr>
                    <td align="right" >状态：</td>
                    <td colspan="3">
                        <volist name=":C('AD_STATUS')" id="vo">
                        <label><input name="status"  type="radio" value="{$key}"><span>{$vo}</span></label>
                        </volist>
                    </td>
                </tr>
                <tr g="cpm_size">
                    <td align="right" >窗口尺寸：</td>
                    <td colspan="3">
                        <label><input type="radio" name="cpm_size" value="0" /><span>全屏</span></label>
                        <label><input type="radio" name="cpm_size" value="1" /><span>指定尺寸</span></label>
                    </td>
                </tr>
                <tr g="size">
                    <td align="right" >尺寸：</td>
                    <td colspan="3">宽 <input name="width" type="text" class="fW40p"> X 高 <input type="text" name="height" class="fW40p" /></td>
                </tr>
                <tr g="html_code">
                    <td align="right">HTML代码：</td>
                    <td colspan="3"><textarea name="html_code" cols="60" rows="5"></textarea></td>
                </tr>
                <tr g="img_url">
                    <td align="right">图片/Flash地址：</td>
                    <td colspan="3"><input type="text" name="img_url" /></td>
                </tr>
                <tr g="zl_item">
                    <td align="right">标题：</td>
                    <td colspan="3"><input type="text" name="zl_title" /></td>
                </tr>
                <tr g="zl_item">
                    <td align="right">封面图片地址：</td>
                    <td colspan="3"><input type="text" name="zl_img_url" /></td>
                </tr>
            </table>
            <ul class="btnList">
                <li><button type="submit" class="btnFormEditSave">保存</button></li>
                <li><a href="?c={$Think.const.CONTROLLER_NAME}" class="btn">返回</a></li>
            </ul>
        </form>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<script>
$(function(){
    <notempty name="record">
    var record = {$record|json_encode};
    record.status = 1;
    record.plan_type = '{$record.plan_type|strtoupper}';
    <if condition="$record.type EQ 'tw'">
    record.html_code = record.code;
    <else />
    record.img_url = record.code;
    </if>

    var model = new Model(record);
    (new Form($('#formEdit'), model)).fill();
    </notempty>

    Ad.edit.init();
})

</script>

<include file="Public:footer" />
